.class public Lcom/waiqin365/base/print/view/PrintFieldItemView;
.super Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field public a:Z

.field public b:Lcom/waiqin365/base/print/view/a;

.field private c:Landroid/content/Context;

.field private d:Landroid/widget/TextView;

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/view/View;

.field private g:Landroid/widget/LinearLayout;

.field private h:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    const-string/jumbo v0, ""

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->h:Ljava/lang/String;

    iput-object p1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->c:Landroid/content/Context;

    invoke-direct {p0}, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    const-string/jumbo v0, ""

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->h:Ljava/lang/String;

    iput-object p1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->c:Landroid/content/Context;

    invoke-direct {p0}, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e()V

    return-void
.end method

.method private e()V
    .locals 4

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->c:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0301cd

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c09b4

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->d:Landroid/widget/TextView;

    const v0, 0x7f0c09b5

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c09b6

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->f:Landroid/view/View;

    const v0, 0x7f0c09b3

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->g:Landroid/widget/LinearLayout;

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->g:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p0}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v2, -0x1

    const/4 v3, -0x2

    invoke-direct {v0, v2, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/base/print/view/PrintFieldItemView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method


# virtual methods
.method public a()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->h:Ljava/lang/String;

    return-object v0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    iget-boolean v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e:Landroid/widget/ImageView;

    const v1, 0x7f02012d

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_1
    iget-boolean v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    if-nez v0, :cond_2

    const/4 v0, 0x1

    :goto_2
    iput-boolean v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->b:Lcom/waiqin365/base/print/view/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->b:Lcom/waiqin365/base/print/view/a;

    iget-boolean v1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    invoke-virtual {p0}, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Lcom/waiqin365/base/print/view/a;->a(ZLjava/lang/String;)V

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e:Landroid/widget/ImageView;

    const v1, 0x7f020129

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_1

    :cond_2
    const/4 v0, 0x0

    goto :goto_2

    :pswitch_data_0
    .packed-switch 0x7f0c09b3
        :pswitch_0
    .end packed-switch
.end method

.method public setBottomLineStatus(Z)V
    .locals 2

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->f:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->f:Landroid/view/View;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0
.end method

.method public setKey(Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->h:Ljava/lang/String;

    return-void
.end method

.method public setLabel(Ljava/lang/String;)V
    .locals 1

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->d:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method public setOnSeletedListener(Lcom/waiqin365/base/print/view/a;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->b:Lcom/waiqin365/base/print/view/a;

    return-void
.end method

.method public setStatus(Z)V
    .locals 2

    iput-boolean p1, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a:Z

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e:Landroid/widget/ImageView;

    const v1, 0x7f020129

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->b:Lcom/waiqin365/base/print/view/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->b:Lcom/waiqin365/base/print/view/a;

    invoke-virtual {p0}, Lcom/waiqin365/base/print/view/PrintFieldItemView;->a()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, p1, v1}, Lcom/waiqin365/base/print/view/a;->a(ZLjava/lang/String;)V

    :cond_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/base/print/view/PrintFieldItemView;->e:Landroid/widget/ImageView;

    const v1, 0x7f02012d

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method
